#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
	int n;
	cin >> n;
	int flag = 1;
	float sum = 0;
	for(int i = 1; i <= n; i++)
	{
		sum += 1.0 / i * flag;
		flag = -flag;
	}
	printf("%.4f\n", sum);
	return 0;
}
